---
layout: "default"
title: "find"
description: "Swift documentation for 'find': Returns the first index where value appears in domain or nil if."
keywords: "find,func,swift,documentation"
root: "/v1.2"
---

<div class="declaration" id="func-find-c_-collectiontype-where-c-generator-element_-equatable_-c-value_-c-generator-element">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-find-c_-collectiontype-where-c-generator-element_-equatable_-c-value_-c-generator-element">func <wbr>find&lt;C :<wbr> CollectionType where C.Generator.Element : Equatable&gt;(<wbr>_:<wbr> C, value: C.Generator.Element)</a>
        
<div class="comment collapse" id="comment-func-find-c_-collectiontype-where-c-generator-element_-equatable_-c-value_-c-generator-element"><div class="p">
    <p>Returns the first index where <code>value</code> appears in <code>domain</code> or <code>nil</code> if
<code>value</code> is not found.</p>

<p>Complexity: O(<code>count(domain)</code>)</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func find&lt;C : CollectionType where C.Generator.Element : Equatable&gt;(domain: C, value: C.Generator.Element) -&gt; C.Index?</code>
    
    
</div></div>
</div>
